package com.xinqi.modules.exam.analyze.dto;

import com.xinqi.common.base.dto.QuestionBaseDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * 课程测评-试题讲解
 *
 * @author linkai
 * @date 2023/7/18
 */
@Data
@Schema(description = "课程测评-试题讲解")
public class QuestionExplainDTO extends QuestionBaseDTO {
    /**
     * 测评人数
     */
    @Schema(description = "测评人数", example = "")
    private Integer allUserCount;
    /**
     * 答题人数
     */
    @Schema(description = "答题人数", example = "")
    private Integer answerUserCount;
    /**
     * 未答人数
     */
    @Schema(description = "未答人数", example = "")
    private Integer unAnswerUserCount;
    /**
     * 答对人数
     */
    @Schema(description = "答对人数", example = "")
    private Integer rightUserCount;
    /**
     * 答错人数
     */
    @Schema(description = "答错人数", example = "")
    private Integer errorUserCount;
    /**
     * 题目得分率
     */
    @Schema(description = "题目得分率", example = "")
    private BigDecimal questionScoreRate;
    /**
     * 答案讲解列表
     */
    @Schema(description = "答案讲解列表", example = "")
    private List<AnswerExplainData> answerExplainList;

    @Data
    @Schema(description = "课程测评-答案讲解")
    public static class AnswerExplainData {
        @Schema(description = "答案", example = "")
        private String answer;
        @Schema(description = "是否对的答案", example = "")
        private Boolean isRight;
        @Schema(description = "答对人数", example = "")
        private Integer rightUserCount;
        @Schema(description = "答错人数", example = "")
        private Integer errorUserCount;
        @Schema(description = "答对人数列表", example = "")
        private List<Long> rightUserList;
        @Schema(description = "答错人数列表", example = "")
        private List<Long> errorUserList;
    }

}
